/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package moteur.paquet;
import moteur.Transport;


/**
 * LE sac de pion transport.
 * @author Administrateur
 */
public class PaquetPionTransport extends PaquetEnum<Transport> {

     private static final  PaquetPionTransport sac = new PaquetPionTransport();

     private PaquetPionTransport(){
        super();
        paquet = new byte[Transport.values().length - 1];
        setPionDefault();
     }

     /**
      *
      * @return
      */
     public final static PaquetPionTransport getInstance() {
         return sac;
     }

     /**
      *
      * @param t
      */
     public void recevoirPion(Transport t){
         if(t != null){
            paquet[t.ordinal()]++;
         }
     }
     
     /**
      * Initialise les pions.
      */
     public void setPionDefault(){
         for (int i = paquet.length ; --i >= 0;){
            paquet[i] = (byte)8;
         }
     }

}
